package com.lokyiu.tutorial.java.trySubstring;

public class trySubstring {
	private String text;

	public trySubstring() {
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getText() {
		return this.text;
	}

	public String getTextAfterAchar(char aChar) {
		int hashId = text.indexOf(aChar);
		String textAfter = text.substring(hashId + 1);
		return textAfter;
	}

	public String getStringBetweenAB(String a, String b) {
		int startPoint = text.indexOf(a) + a.length();
		int endPoint = text.indexOf(b, startPoint);
		return text.substring(startPoint, endPoint);
	}
}